Starting a Local Cluster
In this section, we describe how to set up a local environment for testing your application with the Genvid MILE SDK integration.
Before You Begin
Make sure you have the following tools necessary for SDK integration: * Python v3.10.6 * AWS CLI for Amazon * Azure CLI for Azure * Tight VNC * GIT
Note
The above mentioned tools can also be installed with the help of the Global Packages included with the Genvid Toolbox installer, with the exception of Azure CLI which is currently not offered in the installer.
Install the Genvid Toolbox.
Make sure it’s included in your
PATH
.
Initializing a Local Cluster
At the command line in your shell window:
Install a bastion server.
genvid-bastion install -lmu -b {mybastion}
This command sets up the supervisor servers and runs the Genvid bastion-api services on them. See the genvid-bastion reference for more information on what this script does.
Changed in version 1.20.0: Creating a local cluster is now an option when running
genvid-bastion install
. It no longer automatically creates it by default. Run thegenvid-sdk setup
to create a local cluster.mybastion is a unique identifier for your bastion server. It must:
Be between 3 and 32 characters.
Only contain lowercase letters, numbers, or hyphens.
Start with a letter.
The supervisor servers use a working directory under
~/.genvid
. You can change this location by settingGENVID_SERVICES_DATADIR
environment variable to another valid directory.Note
Although most of the data is written under the
GENVID_SERVICES_DATADIR
, the current implementation isn’t able to transfer everything to this specific working directory. Some data, like the Terraform’sworkdir
, must be located next to the Terraform configuration files underbastion-services/terraform
under the installation directory.Set up the local cluster.
genvid-sdk setup
Clean any old configuration information.
genvid-sdk clean-config
Load the current configuration.
genvid-sdk load-config-sdk
Your local environment is now set up with the minimum set of services to run your project.
Make sure you stop all services when you’re done streaming.
All other genvid-bastion commands are available in the genvid-bastion reference page.
Setting the Local IP
By default, the local cluster’s IP addresses are bound to 127.0.0.1. If you want to use a specific machine’s IP address, you need to change two environment variables.
If you have already set up a cluster, you first need to stop the services and clear all current configuration information.
Stop the cluster.
From your preferred Unix shell, uninstall and clean the services.
genvid-bastion uninstall -c
Once any old configuration information is cleared, open a Windows command prompt.
Set
GENVID_DEFAULT_IP
to the visible IP of the machine.Set the
CONSUL_HTTP_ADDR
to the same IP.set GENVID_DEFAULT_IP=123.123.123.123 set CONSUL_HTTP_ADDR=123.123.123.123:8500
From your Unix shell, restart the cluster.
genvid-bastion install -umlb {mybastion}